package com.example.myapp;

import inc.Data;
import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.Button;
import android.widget.EditText;

public class CreateTrip extends Activity{
	
	
	protected void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		setContentView(R.layout.create_trip);
		
		Bundle bundle = getIntent().getExtras();
		final Data data = (Data) bundle.getParcelable("data");
				
		final EditText trip_name_text = (EditText) findViewById(R.id.trip_name_text);
		
		
		Button button_continue = (Button) findViewById(R.id.continue_button_create_trip);
		button_continue.setOnClickListener(new OnClickListener() {
			
			@Override
			public void onClick(View v) {
				Intent intent = new Intent(getApplicationContext(), AddMembers.class);
				intent.putExtra("trip name", trip_name_text.getText().toString());
				intent.putExtra("data", data);
				startActivity(intent);	
			}
		});
	}
}
